<?php if (!defined('BASEPATH'))
    exit('No direct script access allowed');
include ("settings.php");

class About extends CI_Controller
{

    /**
     * Index Page for this controller.
     *
     * Maps to the following URL
     * 		http://example.com/index.php/About
     *	- or -  
     * 		http://example.com/index.php/About/index
     *	- or -
     * Since this controller is set as the default controller in 
     * config/routes.php, it's displayed at http://example.com/
     *
     * So any other public methods not prefixed with an underscore will
     * map to /index.php/About/<method_name>
     * @see http://codeigniter.com/user_guide/general/urls.html
     */

    public function index()
    {
        $data['phone'] = $this->info->phone_number;	
		$data['collections'] = $this->info->collections;
		$data['latests'] = $this->info->latest_images;
        $db_data = $this->tdatabase->get_entry('aboutus');
		if (isset($db_data)) {
			$db_data = $db_data[0];
			$data['text'] = $db_data->text;
			$data['img'] = $db_data->img;
		}
        $this->parser->parse("about.tpl", $data);
    }

    public function __construct()
    {
        parent::__construct();
        $this->load->database();
        $this->load->model('tdatabase_model', 'tdatabase');
        $this->load->model('images_model', 'images');
        $this->load->model('info_model', 'info'); 
    }

}

/* End of file About.php */
/* Location: ./application/controllers/About.php */
